home *** CD-ROM | disk | FTP | other *** search
/ Giga Games 1 / Giga Games.iso / net / usenet / volume11 / vcraps / patch1 < prev    next >
Encoding:
Internet Message Format  |  1990-08-28  |  3.6 KB

  1. Path: uunet!zephyr.ens.tek.com!tekred!saab!billr
  2. From: billr@saab.CNA.TEK.COM (Bill Randle)
  3. Newsgroups: comp.sources.games
  4. Subject: v11i036:  vcraps - display-oriented craps game, Patch1
  5. Message-ID: <6202@tekred.CNA.TEK.COM>
  6. Date: 24 Aug 90 18:09:42 GMT
  7. Sender: news@tekred.CNA.TEK.COM
  8. Lines: 107
  9. Approved: billr@saab.CNA.TEK.COM
  10.  
  11. Submitted-by: Robert Steven Glickstein <bobg+@andrew.cmu.edu>
  12. Posting-number: Volume 11, Issue 36
  13. Archive-name: vcraps/Patch1
  14. Patch-To: vcraps: Volume 11, Issue 34-35
  15.  
  16. [[This patch adds the '$' keystroke to the list of commands.  '$'
  17. tallies up the players wagers and reports the total.]]
  18.  
  19. #! /bin/sh
  20. # This is a shell archive.  Remove anything before this line, then unpack
  21. # it by saving it into a file and typing "sh file".  To overwrite existing
  22. # files, type "sh file -c".  You can also feed this as standard input via
  23. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  24. # will see the following message at the end:
  25. #        "End of shell archive."
  26. # Contents:  patches01
  27. # Wrapped by billr@saab on Fri Aug 24 11:07:27 1990
  28. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  29. if test -f 'patches01' -a "${1}" != "-c" ; then 
  30.   echo shar: Will not clobber existing file \"'patches01'\"
  31. else
  32. echo shar: Extracting \"'patches01'\" \(2062 characters\)
  33. sed "s/^X//" >'patches01' <<'END_OF_FILE'
  34. X*** dist/vcraps.c    Thu Aug 23 16:30:41 1990
  35. X--- vcraps.c    Thu Aug 23 16:25:29 1990
  36. X***************
  37. X*** 159,168 ****
  38. X      Update(fullupdate);
  39. X      bcopy(&Table, &OldTable, (sizeof(CrapsTable_t)));
  40. X      fullupdate = 0;
  41. X!     Prompt("Command [12345689abcdfhprtX?]:");
  42. X      wclear(commandwin);
  43. X      wrefresh(commandwin);
  44. X!     c = Getch("12345689abcdfhprtX?", 1);
  45. X      switch (c) {
  46. X          case '1':
  47. X          Prompt("[012]:");
  48. X--- 159,168 ----
  49. X      Update(fullupdate);
  50. X      bcopy(&Table, &OldTable, (sizeof(CrapsTable_t)));
  51. X      fullupdate = 0;
  52. X!     Prompt("Command [12345689abcdfhprt$X?]:");
  53. X      wclear(commandwin);
  54. X      wrefresh(commandwin);
  55. X!     c = Getch("12345689abcdfhprt$X?", 1);
  56. X      switch (c) {
  57. X          case '1':
  58. X          Prompt("[012]:");
  59. X***************
  60. X*** 870,875 ****
  61. X--- 870,878 ----
  62. X              break;
  63. X          }
  64. X          break;
  65. X+         case '$':
  66. X+         ShowTotal();
  67. X+         break;
  68. X          case 'X':
  69. X          return (0);
  70. X          case '?':
  71. X***************
  72. X*** 1694,1702 ****
  73. X      addstr("4dc - don't-come odds on 4    4dp - don't place 4\n\n");
  74. X      addstr("Bets are taken down by typing t followed by one of the\n");
  75. X      addstr("bet commands above.\n\n");
  76. X!     addstr("X   - Exit program\n");
  77. X!     addstr("                                         continue...");
  78. X      refresh();
  79. X      getch();
  80. X      longjmp(LoopEnv, 2);
  81. X  }
  82. X--- 1697,1716 ----
  83. X      addstr("4dc - don't-come odds on 4    4dp - don't place 4\n\n");
  84. X      addstr("Bets are taken down by typing t followed by one of the\n");
  85. X      addstr("bet commands above.\n\n");
  86. X!     addstr("$   - show total bets         X   - Exit program\n");
  87. X!     addstr("                                                    continue...");
  88. X      refresh();
  89. X      getch();
  90. X      longjmp(LoopEnv, 2);
  91. X+ }
  92. X+ 
  93. X+ ShowTotal()
  94. X+ {
  95. X+     int i, total = 0;
  96. X+     char buf[80];
  97. X+ 
  98. X+     for (i = craps_PassLine; i < craps_Bets; ++i)
  99. X+     total += Craps_GetBet(&Table, i);
  100. X+     sprintf(buf, "Wagers on table total $%d", total);
  101. X+     Message(buf);
  102. X  }
  103. X
  104. X*** /dev/null    Fri Aug 24 11:00:03 1990
  105. X--- patchlevel.h    Fri Aug 24 11:04:33 1990
  106. X***************
  107. X*** 0 ****
  108. X--- 1 ----
  109. X+ #define PATCHLEVEL    1
  110. END_OF_FILE
  111. if test 2062 -ne `wc -c <'patches01'`; then
  112.     echo shar: \"'patches01'\" unpacked with wrong size!
  113. fi
  114. # end of 'patches01'
  115. fi
  116. echo shar: End of shell archive.
  117. exit 0
  118.